DataSource for Entity Framework in WPF
C1.Data.Entities Namespace / EntityFrameworkExtensions Class / AsLive Method / AsLive<T>(ICollection<T>,EntityClientScope) Method
The type of the entities in the pocoCollection.
The entity collection to convert. It must be of type EntityCollection.
The EntityClientScope to which the entity owning this collection belongs (in which it was fetched by a query or created).

In This Topic
    AsLive<T>(ICollection<T>,EntityClientScope) Method
    In This Topic
    Converts a POCO EntityCollection to an editable live view.
    Syntax
    'Declaration
     
    Public Overloads Shared Function AsLive(Of T As Class)( _
       ByVal pocoCollection As ICollection(Of T), _
       ByVal scope As EntityClientScope _
    ) As View(Of T)
    public static View<T> AsLive<T>( 
       ICollection<T> pocoCollection,
       EntityClientScope scope
    )
    where T: class

    Parameters

    pocoCollection
    The entity collection to convert. It must be of type EntityCollection.
    scope
    The EntityClientScope to which the entity owning this collection belongs (in which it was fetched by a query or created).

    Type Parameters

    T
    The type of the entities in the pocoCollection.

    Return Value

    The resulting live view.
    Exceptions
    ExceptionDescription
    The pocoCollection is not of type EntityCollection.
    Remarks
    When POCO objects are used (with proxies), navigation collection properties are typed as ICollection, not EntityCollection (although they are EntityCollection at run time). That is why a special AsLive extension method must be used.
    See Also